package com.vehicle_demo.controller;

import com.vehicle_demo.dto.Response;
import com.vehicle_demo.dto.Signal;
import com.vehicle_demo.service.WarningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;



@RestController
@RequestMapping("/api")
public class WarnController {

    @Autowired
    private WarningService warningService;

    @PostMapping("/warn")
    public List<Response> analyzeWarnings(@RequestBody List<Signal> signals) {
        return warningService.analyzeWarnings(signals);
    }


}

